package com.lichongbing.lyoggl.mapper;

import com.lichongbing.lyoggl.model.Tags;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Entity com.lichongbing.lyoggl.model.Tags
 */
@Component
public interface TagsMapper extends BaseMapper<Tags> {
    @Select("select t.id, t.name, t.r,t.g,t.b,t.color from tags t where  t.uid  = #{userid}")
    List<Tags> getTagsByUserId(String userid);
    @Delete("delete from tags where id = #{id}")
    int deleteByUserid(String id);
}




